
<?php include_once 'common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once 'common/shop_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>商城管理</strong> &gt;&gt; 注册送100活动列表
		</div>
		
		<div class="admin_right_con">
			<table border="0" cellspacing="1" cellpadding="0">
			  <tr style="color:#0068b7;">
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>编号</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>用户名</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>内容</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>状态</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>时间</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>操作</strong></td>
			  </tr>
			  <?php foreach($list as $info){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['username'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['content'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $info['status']==1 ? '未通过':'审核通过';?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo date('Y-m-d H:i:s',$info['date']);;?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF">
					<?php if($info['status']==1){?>
						<font>已屏蔽</font>
					<?php }else{?>
						<a href="javascript:if(confirm('你确定屏蔽此内容？')){checkReg(<?php echo $info['id'];?>);}">屏蔽</a>
					<?php }?>
				</td>
			  </tr>
			  <?php }?>
			  <tr>
			  	<td  height="35" colspan="12" align="center" class="page" bgcolor="#FFFFFF"><?php echo $this->pagination->create_links();?>共<?php echo $count;?>条记录</td>
			  </tr>
			</table>
			
			</div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
<script>
	function checkReg(id){
		$.ajax({
			type: "POST",
			url: "/ychadmin/activity/reg_shielding",
			data: "id="+id,
			success: function(msg){
				if(msg=='ok'){
					alert('屏蔽成功');
				}else{
					alert('屏蔽失败');
				}
				window.location.reload();
				
			},
			dataType: "text"
		});
	}
</script>

</body>
</html>
